home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / stngpasm / pure_c / include / uran / uran_la.sh < prev    next >
Encoding:
Text File  |  1997-08-08  |  8.5 KB  |  364 lines

  1. ;----------------------------------------------------------------------------
  2. ;File name:    URAn_LA.SH            Revision date:    1997.08.08
  3. ;Creator:    Ulf Ronald Andersson        Creation date:    1992.11.30
  4. ;(c)1992 by:    Ulf Ronald Andersson        All rights reserved
  5. ;Released as:    FREEWARE            (commercial sale forbidden)
  6. ;----------------------------------------------------------------------------
  7. ;Purpose:    Symbol & Macro library for line_A operations
  8. ;----------------------------------------------------------------------------
  9. ;Required header declarations:
  10. ;
  11. ;    include    "uran\STRUCT.SH"
  12. ;    include    "uran\URAn_SYS.SH"
  13. ;    include    "uran\URAn_LA.SH"
  14. ;
  15. ;----------------------------------------------------------------------------
  16. ;    Line_a opcode macros:
  17. ;
  18. ;_a_init
  19. ;_a_put_pixel
  20. ;_a_get_pixel
  21. ;_a_line
  22. ;_a_hline
  23. ;_a_bar        or     _a_recfl
  24. ;_a_pline
  25. ;_a_bitblt
  26. ;_a_textblt
  27. ;_a_show_c    or    _a_showm
  28. ;_a_hide_c    or    _a_hidem
  29. ;_a_form
  30. ;_a_undraw
  31. ;_a_draw
  32. ;_a_cpyfm
  33. ;_a_contour
  34. ;
  35. ;linea #n    ;special concession to DS_DRAIN
  36. ;----------------------------------------------------------------------------
  37. ;    Line-A opcodes
  38. ;
  39. la_op_init    equ    $a000
  40. la_op_put_pixel    equ    $a001
  41. la_op_get_pixel    equ    $a002
  42. la_op_line    equ    $a003
  43. la_op_hline    equ    $a004
  44. la_op_recfl    equ    $a005
  45. la_op_pline    equ    $a006
  46. la_op_bitblt    equ    $a007
  47. la_op_textblt    equ    $a008
  48. la_op_show_c    equ    $a009
  49. la_op_hide_c    equ    $a00a
  50. la_op_form    equ    $a00b
  51. la_op_undraw    equ    $a00c
  52. la_op_draw    equ    $a00d
  53. la_op_cpyfm    equ    $a00e
  54. la_op_contour    equ    $a00f    ;(post TOS 1.0)
  55. ;
  56. ;    Alternative opcode names
  57. ;
  58. la_op_putpix    equ    $a001
  59. la_op_getpix    equ    $a002
  60. la_op_abline    equ    $a003
  61. la_op_habline    equ    $a004
  62. la_op_rectfill    equ    $a005
  63. la_op_polyfill    equ    $a006
  64. la_op_showm    equ    $a009
  65. la_op_showcur    equ    $a009
  66. la_op_hidem    equ    $a00a
  67. la_op_hidecur    equ    $a00a
  68. la_op_chgcur    equ    $a00b
  69. la_op_unsprite    equ    $a00c
  70. la_op_drsprite    equ    $a00d
  71. la_op_copyrstr    equ    $a00e
  72. la_op_seedfill    equ    $a00f    ;(post TOS 1.0)
  73. ;
  74. ;----------------------------------------------------------------------------
  75. ;    BITBLT data structure (for ptr in a6)
  76. ;
  77.     struct    blt_struct
  78.     d_w    blt_b_wd    ;00 block width  [Pixels]
  79.     d_w    blt_b_ht    ;02 block height [Pixels]
  80.     d_w    blt_plane_ct    ;04 bit planes
  81.     d_w    blt_fg_col    ;06 foreground colour
  82.     d_w    blt_bg_col    ;08 background colour
  83.     d_s    blt_op_tab,4    ;10 4 blitter opcodes
  84. ;
  85.     d_w    blt_s_xmin    ;14 source X offset within form [Pixels]
  86.     d_w    blt_s_ymin    ;16 source Y offset within form [Pixels]
  87.     d_l    blt_s_form    ;18 source form base address
  88.     d_w    blt_s_nxwd    ;22 offset between words of a plane  [Bytes]
  89.     d_w    blt_s_nxln    ;24 offset between source lines      [Bytes]
  90.     d_w    blt_s_nxpl    ;26 offset between source bit planes [Bytes]
  91. ;
  92.     d_w    blt_d_xmin    ;28 dest X offset within form [Pixels]
  93.     d_w    blt_d_ymin    ;30 dest Y offset within form [Pixels]
  94.     d_l    blt_d_form    ;32 dest form base address
  95.     d_w    blt_d_nxwd    ;36 offset between words of a plane [Bytes]
  96.     d_w    blt_d_nxln    ;38 offset between dest lines       [Bytes]
  97.     d_w    blt_d_nxpl    ;40 offset between dest bit planes  [Bytes]
  98. ;
  99.     d_l    blt_p_addr    ;42 source mask pattern address (0=unused) *1
  100.     d_w    blt_p_nxln    ;46 offset between pattern lines [2^x Bytes]
  101.     d_w    blt_p_nxpl    ;48 offset between pattern bit planes [Bytes]
  102.     d_w    blt_p_mask    ;50 pattern index mask [(2^x)*(2^y)-1]
  103. ;
  104.     d_s    blt_work,24    ;52 work area for BITBLT routines
  105.     d_alias    blt_size    ;"blt_" structure size = 76 Bytes
  106.     d_end    blt_struct
  107. ;
  108. ;----------------------------------------------------------------------------
  109. ;    Line-A Variables
  110. ;
  111. la_cur_font    equ    -$38A    ;->
  112. ;-$386 .. -$359 are reserved
  113. la_m_pos_hx    equ    -$358    ;w
  114. la_m_pos_hy    equ    -$356    ;w
  115. la_m_planes    equ    -$354    ;w
  116. la_m_cdb_bg    equ    -$352    ;w
  117. la_m_cdb_fg    equ    -$350    ;w
  118. la_mask_form    equ    -$34e    ;w*32
  119. la_inq_tab    equ    -$30e    ;w*45
  120. ;
  121. la_inq_bgcolours    equ    -$30C    ;w
  122. la_inq_bgcolors    equ    -$30C    ;w
  123. ;
  124. la_inq_planes    equ    -$306    ;w
  125. la_inq_lookup_f    equ    -$304    ;w
  126. la_inq_op_speed    equ    -$302    ;w
  127. ;
  128. la_dev_tab    equ    -$2b4    ;w*45
  129. la_workout    equ    -$2B4    ;w*45
  130. la_wk_xmax    equ    -$2B4    ;w
  131. la_wk_ymax    equ    -$2B2    ;w
  132. la_wk_coord_f    equ    -$2B0    ;w
  133. la_wk_pixwidth    equ    -$2AE    ;w
  134. la_wk_pixheight    equ    -$2AC    ;w
  135. la_wk_t_sizes    equ    -$2AA    ;w
  136. la_wk_l_types    equ    -$2A8    ;w
  137. la_wk_l_widths    equ    -$2A6    ;w
  138. la_wk_m_types    equ    -$2A4    ;w
  139. la_wk_m_sizes    equ    -$2A2    ;w
  140. la_wk_t_fonts    equ    -$2A0    ;w
  141. la_wk_f_p_pats    equ    -$29E    ;w
  142. la_wk_f_l_pats    equ    -$29C    ;w
  143. la_wk_maxcolours    equ    -$29A    ;w
  144. la_wk_maxcolors    equ    -$29A    ;w
  145. la_wk_palregs    equ    -$29A    ;w
  146. ;
  147. la_wk_colour_f    equ    -$26E
  148. la_wk_color_f    equ    -$26E
  149. ;
  150. la_wk_palcolours    equ    -$266    ;w
  151. la_wk_palcolors    equ    -$266    ;w
  152. la_wk_palvalues    equ    -$266    ;w
  153. ;
  154. la_gcurx    equ    -$25a    ;w
  155. la_gcury    equ    -$258    ;w
  156. la_m_hid_ct    equ    -$256    ;w
  157. la_mouse_bt    equ    -$254    ;w
  158. la_req_col    equ    -$252    ;w*3*16
  159. la_siz_tab    equ    -$1f2    ;w*15
  160. ;-$1d4 .. -$1d1 are reserved
  161. la_cur_work    equ    -$1d0    ;->
  162. la_def_font    equ    -$1cc    ;->
  163. ;
  164. la_font_ring    equ    -$1c8    ;->*4
  165. la_font_gdos    equ    -$1c0    ;->
  166. ;
  167. la_font_count    equ    -$1b8    ;w
  168. ;-$1b6 .. -$15d are reserved
  169. la_cur_ms_stat    equ    -$15c    ;b
  170. ;-$15b is reserved
  171. la_v_hid_cnt    equ    -$15a    ;w
  172. la_cur_x    equ    -$158    ;w
  173. la_cur_y    equ    -$156    ;w
  174. la_cur_flag    equ    -$154    ;b
  175. la_mouse_flag    equ    -$153    ;b
  176. ;-$152 .. -$14f    are reserved
  177. la_v_sav_xy    equ    -$14e    ;w*2
  178. la_save_len    equ    -$14a    ;w
  179. la_save_addr    equ    -$148    ;->
  180. la_save_stat    equ    -$144    ;w
  181. la_save_area    equ    -$142    ;b*256
  182. la_user_tim    equ    -$42    ;->
  183. la_next_tim    equ    -$3e    ;->
  184. la_user_but    equ    -$3a    ;->
  185. la_user_cur    equ    -$36    ;->
  186. la_user_mot    equ    -$32    ;->
  187. la_v_cel_ht    equ    -$2E    ;w
  188. la_v_cel_mx    equ    -$2C    ;w
  189. la_v_cel_my    equ    -$2A    ;w
  190. la_v_cel_wr    equ    -$28    ;w
  191. la_v_col_bg    equ    -$26    ;w
  192. la_v_col_fg    equ    -$24    ;w
  193. la_v_cur_ad    equ    -$22    ;w
  194. la_v_cur_of    equ    -$1E    ;w
  195. ;
  196. la_v_cur_xy    equ    -$1C    ;w*2
  197. la_v_cur_x    equ    -$1C    ;w
  198. la_v_cur_y    equ    -$1A    ;w
  199. ;
  200. la_v_period    equ    -$18    ;b
  201. la_v_cur_ct    equ    -$17    ;b
  202. la_v_fnt_ad    equ    -$16    ;->
  203. la_v_fnt_nd    equ    -$12    ;w
  204. la_v_fnt_st    equ    -$10    ;w
  205. la_v_fnt_wd    equ    -$0e    ;w
  206. la_v_rez_hz    equ    -$0C    ;w
  207. la_v_off_ad    equ    -$0a    ;->
  208. ;-$06 .. -$05 are reserved
  209. la_resv_n_1    equ    -$06
  210. la_v_rez_vt    equ    -$04    ;w
  211. la_bytes_lin    equ    -$02    ;w
  212. la_planes    equ    $00    ;w
  213. la_width    equ    $02    ;w
  214. ;
  215. la_vdipb    equ    $04    ;->*5
  216. la_contrl_p    equ    $04    ;->
  217. la_intin_p    equ    $08    ;->
  218. la_ptsin_p    equ    $0C    ;->
  219. la_intout_p    equ    $10    ;->
  220. la_ptsout_p    equ    $14    ;->
  221. ;
  222. la_colbit0    equ    $18    ;w
  223. la_colbit1    equ    $1A    ;w
  224. la_colbit2    equ    $1C    ;w
  225. la_colbit3    equ    $1E    ;w
  226. la_lstlin    equ    $20    ;w
  227. la_lnmask    equ    $22    ;w
  228. la_wmode    equ    $24    ;w
  229. la_x1        equ    $26    ;w
  230. la_y1        equ    $28    ;w
  231. la_x2        equ    $2A    ;w
  232. la_y2        equ    $2C    ;w
  233. la_patptr    equ    $2E    ;l
  234. la_patmsk    equ    $32    ;w
  235. la_mfill    equ    $34    ;w
  236. la_clip        equ    $36    ;w
  237. ;
  238. la_cliprect    equ    $38    ;w*4
  239. la_xmincl    equ    $38    ;w
  240. la_ymincl    equ    $3a    ;w
  241. la_xmaxcl    equ    $3c    ;w
  242. la_ymaxcl    equ    $3e    ;w
  243. ;
  244. la_xdda        equ    $40    ;w
  245. la_ddainc    equ    $42    ;w
  246. la_scaldir    equ    $44    ;w
  247. la_mono        equ    $46    ;w
  248. la_sourcex    equ    $48    ;w
  249. la_sourcey    equ    $4a    ;w
  250. la_destx    equ    $4c    ;w
  251. la_desty    equ    $4e    ;w
  252. la_delx        equ    $50    ;w
  253. la_dely        equ    $52    ;w
  254. la_fbase    equ    $54    ;->
  255. la_fwidth    equ    $58    ;w
  256. la_style    equ    $5a    ;w
  257. la_litemask    equ    $5c    ;w
  258. la_skewmask    equ    $5e    ;w
  259. la_weight    equ    $60    ;w
  260. la_roff        equ    $62    ;w
  261. la_loff        equ    $64    ;w
  262. la_scale    equ    $66    ;w
  263. la_chup        equ    $68    ;w
  264. la_textfg    equ    $6a    ;w
  265. la_scrtchp    equ    $6c    ;->
  266. la_scrpt2    equ    $70    ;w
  267. la_textbg    equ    $72    ;w
  268. la_copytran    equ    $74    ;w
  269. la_seedabort    equ    $76    ;-> (post TOS 1.0)
  270. ;
  271. la_curblit_tb    equ    $7A
  272. la_lk_scroller    equ    $7E    ;-> scroll routine
  273. la_lk_scrollend    equ    $82    ;-> jump destination when scroll done
  274. la_actblit_p    equ    $A2    ;-> hard blitter link table
  275. la_pasblit_p    equ    $A6    ;-> soft blitter link table
  276. la_blitstate    equ    $AA    ;.w blitter active=3, passive=2, absent=0
  277. ;
  278. ;----------------------------------------------------------------------------
  279. ;    Line-A macros
  280. ;
  281.     macro    _a_init
  282.     dc.w    la_op_init
  283.     endm
  284. ;
  285.     macro    _a_put_pixel
  286.     dc.w    la_op_put_pixel
  287.     endm
  288. ;
  289.     macro    _a_get_pixel
  290.     dc.w    la_op_get_pixel
  291.     endm
  292. ;
  293.     macro    _a_line
  294.     dc.w    la_op_line
  295.     endm
  296. ;
  297.     macro    _a_hline
  298.     dc.w    la_op_hline
  299.     endm
  300. ;
  301.     macro    _a_recfl
  302.     dc.w    la_op_recfl
  303.     endm
  304. ;
  305.     macro    _a_bar
  306.     dc.w    la_op_recfl
  307.     endm
  308. ;
  309.     macro    _a_pline
  310.     dc.w    la_op_pline
  311.     endm
  312. ;
  313.     macro    _a_bitblt
  314.     dc.w    la_op_bitblt
  315.     endm
  316. ;
  317.     macro    _a_textblt
  318.     dc.w    la_op_textblt
  319.     endm
  320. ;
  321.     macro    _a_show_c
  322.     dc.w    la_op_show_c
  323.     endm
  324. ;
  325.     macro    _a_showm
  326.     dc.w    la_op_showm
  327.     endm
  328. ;
  329.     macro    _a_hide_c
  330.     dc.w    la_op_hide_c
  331.     endm
  332. ;
  333.     macro    _a_hidem
  334.     dc.w    la_op_hidem
  335.     endm
  336. ;
  337.     macro    _a_form
  338.     dc.w    la_op_form
  339.     endm
  340. ;
  341.     macro    _a_undraw
  342.     dc.w    la_op_undraw
  343.     endm
  344. ;
  345.     macro    _a_draw
  346.     dc.w    la_op_draw
  347.     endm
  348. ;
  349.     macro    _a_cpyfm
  350.     dc.w    la_op_cpyfm
  351.     endm
  352. ;
  353.     macro    _a_contour
  354.     dc.w    la_op_contour    ;(post TOS 1.0)
  355.     endm
  356. ;
  357.     macro    linea    funcnum
  358.     aline    funcnum
  359.     endm
  360. ;
  361. ;----------------------------------------------------------------------------
  362. ;    End of file:    URAn_LA.SH
  363. ;----------------------------------------------------------------------------
  364.